home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Animation How-To
/
Animation How-to CD.iso
/
PLY
/
CHAPTER4
/
THREAD
/
THREAD.PI
< prev
Wrap
Text File
|
1994-01-01
|
2KB
|
70 lines
// Spiraling Bezier Animation: Jeff Bowermaster
start_frame 0
end_frame 44
total_frames 45
define index 360/total_frames
outfile thred
include "\ply\colors.inc"
// Set up background color & lights
background midnightblue
light <0,25,0>
light <10,50,-120>
viewpoint {
from <5.01, 40.01,-40.01>
at <0,0,7.5>
up <0, 1, 0>
angle 30
resolution 320,200
aspect 1.433
}
// make a tabletop
define table
object {
polygon 4,<-25,0.01,-25>,<25,0.01,-25>,<25,0.01,25>,<-25,0.01,25>
reflective_blue
}
object {
box <-25,-1,-25>,<25,0,25>
texture {surface { color navyblue ambient 0.2 diffuse 0.6}}
}
define pi 3.14159
define rad pi/180
// Blobs 3-phased height components - each 1/3rd out from the other
define a 7 + 3*sin(index*frame*rad)
define b 7 + 3*sin(index*(frame+(total_frames/3)*rad))
define c 7 + 3*sin(index*(frame+(2*total_frames/3)*rad))
object {
blob 0.6:
sphere <0,a,0>, 3, 3,
sphere <0,b,0>, 4, 4,
sphere <0,c,0>, 5, 5
reflective_cyan
}
// rotate the base bezier patch
define p1 rotate(<1,1,0>,<0,0,frame*index/2>)
define p2 rotate(<-1,1,0>,<0,0,frame*index/2>)
define p3 rotate(<1,-1,0>,<0,0,frame*index/2>)
define p4 rotate(<-1,-1,0>,<0,0,frame*index/2>)
define r 10 // radius of spiral
define thread 5 / 360 // gives 5 units up per 360 degree
static define ang 0 // angular rotation of segment pieces
define offs 0.04 // pull control points out 4%, "round" the spiral
define detail 0.1
include "thread.inc"